#ifndef LYRICLABEL_H
#define LYRICLABEL_H

#include <QLabel>
#include <QLinearGradient>
#include <QTimer>
class LyricLabel : public QLabel
{
    Q_OBJECT
public:
    explicit LyricLabel(QWidget *parent = nullptr);
    void setAddWidthByTotal(int total);
    void changeMaskRect();
    void stopTimer();
protected:
    void paintEvent(QPaintEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void contextMenuEvent(QContextMenuEvent *event);
signals:
private:
    QLinearGradient lineGradient;
    QLinearGradient maskLineGradient;
    QFont font;
    QTimer timer;
    int left;
    int right;
    int add;
    int step = 30;
    QPoint offset;
};

#endif // LYRICLABEL_H
